/**
 * 不借助变量交换两个数的值
 */

 function swap(x, y){
    x = x - y // 5, 2 x = 3
    y = x + y // 3 2 y = 5
    x = y - x // 5 3 x = 2
    return [x, y] 
 }

 const res = swap(1, 2)
//  console.log(res);


let arr = [1, 2, 3, 4, 5]
for (let item of arr.entries()) {
  console.log(item)
}

for(let key of arr.keys()){
    console.log(key);
}

for(let values of arr.values()){
    console.log(values);
}


